Skip to main content

Triggers

Overview

With Bizagi 11, managing data is enhanced through a new feature called triggers, which helps you react in real time to changes in data.

Triggers run automatically in the background (performed by the Scheduler) as a response to certain events in the underlying data.
Similar to the concept of database triggers, in Bizagi these triggers react when a new record is created or an existing one is modified (insert or update clauses).

Triggers_overview

The image above illustrates the concept of how triggers listen to events and execute actions upon a detected change.


Triggers Capabilities

An example use of triggers is activating a special procedure for a customer who becomes a VIP.
For instance, a customer may become VIP by:

  • Completing a purchase above a predefined amount.
  • Redeeming a promotional voucher.
  • Being updated as VIP due to a new policy.

By using a trigger in this scenario, you can:

  • Keep process models tidier by avoiding embedding BPMN logic to validate VIP customers.
  • Use an efficient event-driven mechanism that reacts to real-time changes, instead of performing periodic validations.
  • Provide options in the Work Portal to update customer information in forms, while maintaining focus on trigger configuration.

Additionally, the procedure triggered for a VIP customer could:

  • Update applicable information (e.g., increase their discount percentage).
  • Launch a process (e.g., approve or send a promotion code or a new pre-approved product offering).

This means a trigger can execute a business rule or start a whole new process.


Configuring Triggers

To define a trigger, consider that its configuration is performed at the entity on which the trigger will listen for changes.

A trigger is executed when either of these events occurs:

  • A new record of the specified entity is created.
  • An existing record of the specified entity is modified.

For either case, you can define conditions that the record must meet (evaluating the condition for that record returns true).

The trigger will then execute one of the following actions:

  1. Launch a process: Create a new instance of a process.
  2. Execute an expression.

Details of Execution

  • Launch a Process:
    Bizagi automatically injects the record's information into the Process entity. For this to work, the Process entity must have a foreign key referencing the triggering entity.

  • Execute an Expression:
    The context of the expression is automatically set to the entity of the record that caused the trigger.

Defining a Trigger

  1. Go to the Expert view and click Entities.
  2. Locate the given entity and go into its Triggers item.

Triggers_new

  1. Right-click to create a new trigger.
    During trigger creation or editing, the following properties are available for configuration: Triggers_new

Trigger Properties

PROPERTYDESCRIPTION
Display nameA descriptive name for identifying and looking up the trigger.
Trigger optionsDetermine when the trigger will be launched by marking the checkboxes:
- A new record of the entity is created: Trigger activates when a new record is created.
- A field of the entity is updated: Trigger activates when a field is modified.
Condition ruleSet a Boolean expression that defines the condition the record must meet for the trigger to activate. (Mandatory.)
Use the AdvancedAction_00 icon to create a new expression.
ActionDefine whether the trigger will:
- Launch a new case for the following process: Choose the process from the drop-down or use the AdvancedAction_00 icon.
- Execute an expression: Choose the expression from the drop-down or use the AdvancedAction_00 icon.

Saving and Examples

Once configured, click OK to save the trigger.

Triggers are categorized by the type of action they perform:

  • Process Triggers: Launch new processes.
  • Expression Triggers: Execute business rules or expressions.

For examples of each scenario, refer to the respective child topics.


Examples

Triggers are mainly classified into two action types:

  • Process triggers: Define scenarios that launch new processes.
  • Expression triggers: Define scenarios that execute business rules or logic.